<?php
namespace haibao\user\data;
use \haibao\frame\data\MysqlData;

abstract class BaseMysql extends MysqlData{
	private static $cacheObject = null;
	
	public function __construct($modelName){
		parent::__construct($modelName);
		$this->setConfig(\haibao\classlibrary\www\Config::CLASSLIBRARY_CONFIG_MYSQL_HAIBAO_DZ3);
	}
	
	public function getCache($key){
		$cache = $this->getCacheObject();
		return $cache->get($key);
	}
	
	public function setCache($key,$value){
		$cache = $this->getCacheObject();
		$cache->set($key, $value);
	}
	
	public function unsetCache($key){
		$cache = $this->getCacheObject();
		$cache->del($key);
	}
}